package com.sy.utils;

import java.util.Random;

/**
 * @Author PangHu
 * @Date 2022/6/27 16:14
 * @Description
 */
public class SmsCodeUtils {
    private SmsCodeUtils(){

    }
    public static String getRandomString(int length) {
        Random r = new Random();
        String str = "1234567890";
        String result = "";
        for (int i = 1; i <= length; i++) {
            char c = str.charAt(r.nextInt(str.length()));
            result += c;
        }
        return result;
    }
}
